import { getDB } from "../../utils/db/mysql";
export default defineEventHandler(async (event) => {
  let con = getDB();
  let body = await readBody(event)
  console.log(body, '获取菜单');
//   let { } = body
  let [data] = await con.query("SELECT * FROM menu");
  //释放连接
  await con.end();
  return {
    code:2000,
    message:'添加成功',
    data:data
  }
});